package org.shj.pattern.visitor

abstract class Person { //访问者模式中的Visitor
  def accept(act: Action)
}

class Man extends Person{
  def accept(act: Action){//双分派，第一次派发action，
    act.getManConclusion(this) //第二次派发 element
  }
}

class Woman extends Person{
  def accept(act: Action){
    act.getWomanConclusion(this)
  }
}